package ynu.edu.dao;


import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import ynu.edu.common.dao.LogicDAO;
import ynu.edu.entity.Order1;

import java.util.List;

public interface OrderDao extends LogicDAO<Order1,Long> {
    @Query("select o from Order1 o where o.shop.id=:shopId")
    public List<Order1> getAllMyOrder(@Param("shopId")Long shopId);
    @Query("select o from Order1 o where o.customer.id=:customerId")
    public List<Order1> getAllMyOrderByCustomer(@Param("customerId")Long customerId);
}
